var app = angular.module('App')
.config(['$httpProvider', '$controllerProvider', function($httpProvider, $controllerProvider) {
	$httpProvider.defaults.headers.post = {'Content-Type' : 'application/x-www-form-urlencoded'};
	$controllerProvider.allowGlobals();
}])

.config(function ($stateProvider, $urlRouterProvider) {

     $urlRouterProvider.when("", "login");

     $stateProvider
        .state("login", {
            url: "/login",
            templateUrl: "viwes/login.html",
             controller:'loginCtrl'
        })
        .state("main", {
            url: "/main",
            templateUrl: "viwes/main.html"
        })
        .state("main.houseAdm", {
            url:"/houseAdm",
            templateUrl: "viwes/houseAdm.html",
            controller:'houseAdmCtrl'
        })
        .state("main.eamic", {
            url:"/eamic",
            templateUrl: "viwes/eamic.html",
            controller:'eamicCtrl'
        })
        .state("main.risk", {
            url:"/risk",
            templateUrl: "viwes/risk.html",
            controller:'riskCtrl'
        })
        .state("main.riskManagement", {
            url:"/riskManagement",
            templateUrl: "viwes/riskManagement.html",
            controller:'riskManagementCtrl'
        })
	      .state("main.tenant", {
	            url:"/tenant",
	            templateUrl: "viwes/tenant.html",
	            controller:'tenantCtrl'
	        })
        
});	            